#pragma once
#include "device.h"


class Signal :
	public Device
{
public:
	Signal(void);
	~Signal(void);
	DEF_CREATE_CALLBACK(Signal)
protected:
	DECLARE_MESSAGE_MAP()
	afx_msg void OnPaint();
public:
	virtual void Serialize(CArchive& ar);
	virtual void initPos(CPoint& pt1, CPoint& pt2);
	virtual void setNamePos(void);
public:
	bool isDouble(void) { return _type % 2 == 1; }
	bool isUp(void)     { return _type < GRAPHIC_SIGNAL_HD_DOWN; }
	bool isHigh(void)   { return (_type - GRPAHIC_SIGNAL_HD_UP) % 4 < 2; }
	void setSealPt(void);
public:
	CPoint _basePt;
	CPoint _vPt[2];
	CPoint _hPt[2];
	CPoint _sealPt[4];
	CRect  _lightRect[2];
	int    _defaultColor;
public:
	enum DEFAULT_COLOR
	{
		DEFAULT_RED,
		DEFAULT_BLUE,
		DEFAULT_WHITE,
	};
};

